<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			function foo();
			{
				document.write("foo()");
				
			}
			
		</script>
	</head>
	<body>
		<script type="text/javascript">
			foo1();
			//foo2();无法调用
			
		</script>
		<button onclick="foo2()">按钮1</button>
		<a href="JavaScript：foo2()">链接</a>
		<script type="text/javascript">
			function foo2()
			{
				alert("foo2");
				
			}
		</script>
	</body>
</html>
